import request from '@/utils/request'

export function findAllList(data) {
  return request({
    url: '/interface/list',
    method: 'post',
    data
  })
}


export function parameterTypeGet() {
  return request({
    url: '/interface/parameterType',
    method: 'get'
  })
}


export function requsetMethodTypeGet() {
  return request({
    url: '/interface/requsetMethod',
    method: 'get'
  })
}

export function findtestEnvironmentSelectListGet() {
  return request({
    url: '/testingEnvironment/testEnvironmentSelectList',
    method: 'get'
  })
}

export function addInterfacePost(data) {
  return request({
    url: '/interface/add',
    method: 'post',
    data
  })
}

export function deleteInterfacePost(data) {
  return request({
    url: '/interface/delete',
    method: 'post',
    data
  })
}

export function getDetail(interfaceId) {
  return request({
    url: `/interface/detail/${interfaceId}`,
    method: 'get'
  })
}

export function updateInterface(data) {
  return request({
    url: "/interface/update",
    method: 'post',
    data
  })
}

export function exportInterface() {
  return request({
    url: "/interface/export",
    method: 'get',
    responseType:"blob"
  })
}
